package com.example.section3;

import com.example.section3.pojo.Student;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.PropertySources;


@SpringBootApplication
public class Section3Application {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(Section3Application.class, args);
        if(context.containsBean("student")){
            System.out.println(context.getBean(Student.class));
        }
        if (context.containsBean("teacher")){
            System.out.println(context.getBean("teacher"));
        }
    }

}
